int ${name}_init() {
    /* Initializes the method wrappers by getting the bound methods from the object. */
    PyObject * fromlist = Py_BuildValue("[$bv_fromlist]", $fromlist);
    PyObject * module = NULL, * obj = NULL, * tmp = NULL;
    int rv = 0;
    
    if(!fromlist)
    	return rv;

    module = PyImport_ImportModuleEx("$module_name", NULL, NULL, fromlist);
    if(!module)
    	goto finish;

    $get_object

    $get_methods

    rv = 1;
finish:
    Py_XDECREF(fromlist);
    Py_XDECREF(module);
    Py_XDECREF(obj);
    return rv;
}

/* vim: set syntax=c : */
